#include <iostream>
#include <cstdio>
#include <cstdlib>
using namespace std;

#include <omp.h>

int main(int argc, char* argv[])
{
	int numThreads = 2;
	if (argc >= 2) numThreads = atoi(argv[1]);
	printf("# There are %i threads\n", numThreads);
	
	#pragma omp parallel num_threads(numThreads)
	{
		int tid = omp_get_thread_num();
		printf("%2d: Hello World... \n", tid);
	}

	return EXIT_SUCCESS;
}
